package com.hfjy.bigdata.controller;

import com.github.pagehelper.PageHelper;
import com.hfjy.bigdata.bean.Goods;
import com.hfjy.bigdata.service.QuizService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/v1/quiz")
@RestController
public class QuizController {
    @Autowired
    private QuizService quizService;

    /**
     * 学习中心获取大数据统计quiz
     *
     * @param page
     * @return
     */
    @RequestMapping("/getQuizes")
    public List<Goods> getQuizes(@RequestParam(value = "page", required = false, defaultValue = "1") int page) {
        return quizService.getQuizs(page);
    }


}
